"use strict";
cc._RF.push(module, 'c08d7oaezxA4LUAG1IZxy+M', 'Application');
// script/Application.ts

"use strict";
var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
var Facade_1 = require("../libs/lightMVC/core/Facade");
var PlayerModel_1 = require("./model/PlayerModel");
var PostmodernismMediator_1 = require("./postmodernism/PostmodernismMediator");
var PostmodernismView_1 = require("./postmodernism/PostmodernismView");
var TopMediator_1 = require("./top/TopMediator");
var TopView_1 = require("./top/TopView");
var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
var Application = /** @class */ (function (_super) {
    __extends(Application, _super);
    function Application() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    Application.prototype.onLoad = function () {
        // if (CC_DEBUG) {
        //     cc.view.setOrientation(cc.macro.ORIENTATION_LANDSCAPE);
        //     let canvas = cc.find('Canvas').getComponent(cc.Canvas);
        //     canvas.designResolution = cc.winSize;
        // }
        cc.dynamicAtlasManager.enabled = false;
    };
    Application.prototype.start = function () {
        var self = this;
        //初始化框架
        Facade_1.Facade.getInstance().init(false, cc.size(750, 1448), false, true); //这个分辨率扣除了微信顶部栏和IPhone顶部状态栏
        //注册数据对象
        this.initModel();
        Facade_1.Facade.getInstance().addLayer(TopMediator_1.default, TopView_1.default, 1, "");
        //打开第一个界面
        Facade_1.Facade.getInstance().openView(PostmodernismMediator_1.default, PostmodernismView_1.default, "");
        //测试界面，图片详情窗口
        this.scheduleOnce(function () {
            //     Facade.getInstance().popView(PopImageDetailMediator, PopImageDetailView, "");
        }, 1);
        //Facade.getInstance().getModel(PlayerModel).getPlayer().showroomType = ShowroomType.Person;      //强行标记为个人馆
    };
    /**
     *注册数据对象
     */
    Application.prototype.initModel = function () {
        Facade_1.Facade.getInstance().registerModel(PlayerModel_1.default);
    };
    Application = __decorate([
        ccclass
    ], Application);
    return Application;
}(cc.Component));
exports.default = Application;

cc._RF.pop();